This page provides sample code that shows how easy it is to use DBtools.h++ to pull sales data from the corporate database into a spreadsheet. The syntax is straightforward C++ and the database operations use names familiar to database developers.
From this page, you can also access:
#include <rw/db/db.h> int main () { 1 RWDBDatabase enterpriseDB = RWDBManager::database ("SYBASE", "SYBASESERVER", "ME", "PASSWORD", "DATA"); RWDBTable table1 = enterpriseDB.table("Actual_Sales"); RWDBReader table1Reader = table1.reader(); 2 RWDBDatabase spreadsheet = RWDBManager::database ("ODBC", "MS_EXCEL", "ME", "PASSWORD", "C:\\mydir"); 3 spreadsheet.createTable ("TMPSALES", table1.schema()); RWDBTable spreadsheetTable = spreadsheet.table ("TMPSALES"); 4 RWDBInserter localInserter = spreadsheetTable.inserter(); while (tableReader()); { localInserter << table1Reader; localInserter.execute(); } ... 5 /* Insert DDE code to plot your sales forecast, stored in the second spreadsheet, versus actual sales now stored in the TMPSALES spreadsheet. */